package com.db.aggregation;

import com.db.protocol.message.ReportMessage;

import java.util.LinkedList;
import java.util.List;

/**
 * @author nulls.narik
 */
public class NullAggregation extends AbstractAggregation {

    private List<ReportMessage> messages;

    public NullAggregation() {
        messages = new LinkedList<ReportMessage>();
    }

    @Override
    protected void clear() {
        messages.clear();
    }

    @Override
    protected void add(ReportMessage message) {
        messages.add(message);
    }

    @Override
    protected List<ReportMessage> getList() {
        return new LinkedList<ReportMessage>(messages);
    }

}
